<?php
session_start();

$size_to_modify_img = 5;
$size_to_modify_text = 1;

$size_max_text = 6;
$size_min_text = 2;

$size_max_img = 26;
$size_min_img = 20;

if (isset($_GET['zoom']) && isset($_SESSION['size_text']) && $_GET['zoom'] == 'no')
{
	$_SESSION['size_img'] -= $size_to_modify_img;
	$_SESSION['size_text'] -= $size_to_modify_text;
}

if (isset($_GET['zoom']) && isset($_SESSION['size_text']) && $_GET['zoom'] == 'yes')
{
	$_SESSION['size_img'] = $_SESSION['size_img'] + 10;
	$_SESSION['size_text'] = $_SESSION['size_text'] + 2;
}
if ($_SESSION['size_text'] > $size_max_text)
	$_SESSION['size_text'] = $size_max_text;
if ($_SESSION['size_text'] <= $size_min_text)
	$_SESSION['size_text'] = $size_min_text;
if ($_SESSION['size_img'] > $size_max_img)
	$_SESSION['size_img'] = $size_max_img;
if ($_SESSION['size_img'] < $size_min_img)
	$_SESSION['size_img'] = $size_min_img;

header('Location: index.php');
?>